package com.arron.observer;

/**
 * 显示当前天气情况 可以理解成是气象站自己的网站
 */
public class CurrentConditions {
    private float temperature;//温度
    private float pressure;//气压
    private float humidity;//湿度
    //更新 天气情况，是由WeatherData调用，（推送模式）
    public void update(float temperature, float pressture, float humidity) {
        this.temperature = temperature;
        this.pressure = pressture;
        this.humidity = humidity;
        display();
    }

    /**
     * 显示
     */
    public void display() {
        System.out.println("***Today temperature:" + temperature + "***");
        System.out.println("***Today pressure:" + pressure + "***");
        System.out.println("***Today humidity:" + humidity + "***");
    }
}
